package com.sen.basecode.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sen.basecode.mapper.BaseCodeAttributeMapper;
import com.sen.basecode.model.BaseCodeAttribute;
import com.sen.basecode.service.BaseCodeAttributeService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author ：linsir
 * @date ：Created in 2021/6/22 11:45
 * @description：基础编码明细接口实现
 * @modified By：
 * @version: 1.0.0
 */
@Service
public class BaseCodeAttributeServiceImpl extends ServiceImpl<BaseCodeAttributeMapper, BaseCodeAttribute> implements IService<BaseCodeAttribute>, BaseCodeAttributeService {
    @Override
    public List<BaseCodeAttribute> getListByFieldCode(String fieldCode) {
        return list(Wrappers.<BaseCodeAttribute>lambdaQuery().eq(BaseCodeAttribute::getFieldCode,fieldCode)
        .orderBy(true,true,BaseCodeAttribute::getSort));
    }
}
